<!DOCTYPE html>
<!--
This is a starter template page. Use this page to start your new project from
scratch. This page gets rid of all links and provides the needed markup only.
-->
<html lang="en">

<head>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <meta http-equiv="x-ua-compatible" content="ie=edge">

  <title>{$SETTING.website_name}</title>

  {include file="../Common/cssjs"}
</head>

<body class="hold-transition sidebar-mini">
  <div class="wrapper">

    {include file="../Common/navbar"}

    {include file="../Common/sidebar"}



    <!-- Content Wrapper. Contains page content -->
    <div class="content-wrapper">

      <!-- Main content -->
      <div class="content">
        <div class="container-fluid">
          <div class="row">
            <!-- /.col-md-12 -->
            <div class="col-lg-12">
              <div class="card card-primary">
                <div class="card-header">
                  <h3 class="card-title">添加文章</h3>
                </div>
                <!-- /.card-header -->
                <!-- form start -->
                <form role="form" method="post" action="" id="myform">
                  <input type="hidden" name="UNIQ" value="{$UNIQ}">
                  <div class="card-body">

                    <div class="form-group">
                      <label for="">所属分类*</label>
                      {$category|raw} <a class="example1" href="/article/category_outside?callback=callback_catid">[选择]</a>
                    </div>

                    <div class="form-group">
                      <label for="">标题*</label>
                      <input type="text" class="form-control" name="title" id="" placeholder="" value="">
                    </div>

                    <div class="form-group">
                      <label for="">缩略图</label>
                      <input type="text" class="form-control thumb" name="thumb" id="" placeholder="" value="" readonly>
                      <a class="example1" href="/article/upload_file?callback=callback_thumb&class=thumb&i=0&uniq={$UNIQ}">[选择]</a> <a href="javascript:void(0);" class="clear_thumb">[置空]</a>
                    </div>
                    
                    <div class="form-group">
                      <label for="">内容*</label>
                      <textarea class="form-control" name="content" rows="3" placeholder=""></textarea>
                    </div>

                    <div class="form-group">
                        <label for="">显隐</label>
                        {foreach \core_enums::$flag as $k=>$v}
                        <div class="custom-control custom-radio">
                          <input class="custom-control-input" type="radio" id="customRadio{$k}" name="flag" value="{$k}" {if $flag==$k}checked{/if}>
                          <label for="customRadio{$k}" class="custom-control-label">{$v}</label>
                        </div>
                        {/foreach}
                      </div>
    
                  </div>
                  <!-- /.card-body -->

                  <div class="card-footer text-center">
                    <button type="submit" name="submit" class="btn btn-primary">提交</button>
                  </div>
                </form>
              </div>
            </div>



            <!-- /.col-md-12 -->
          </div>
          <!-- /.row -->
        </div><!-- /.container-fluid -->
      </div>
      <!-- /.content -->
    </div>
    <!-- /.content-wrapper -->

    <!-- Control Sidebar -->
    <aside class="control-sidebar control-sidebar-dark">
      <!-- Control sidebar content goes here -->
      <div class="p-3">
        <h5>Title</h5>
        <p>Sidebar content</p>
      </div>
    </aside>
    <!-- /.control-sidebar -->


    {include file="../Common/footer"}
  </div>
  {include file="js"}
</body>

</html>